package com.example.knowleage.threadPool;

import java.util.concurrent.Callable;

/**
 * @ClassName MyTask
 * @Description TODO
 * @Author KunxianLi
 * Date 2021/4/16 17:14
 * Version 1.0
 **/
/**
 *这里注意要继承泛型
 **/
public class MyCallableTask<Integer> implements Callable<Integer> {

    public Integer taskNum;

    public MyCallableTask(Integer taskNum){
        this.taskNum = taskNum;
    }


    @Override
    public Integer call() throws Exception {

        return taskNum;
    }
}
